import PyPDF2
import jieba as jb

pdf_file = open('采购协同 产品操作说明书.pdf', 'rb')

pdf_reader = PyPDF2.PdfReader(pdf_file)

pages_num = len(pdf_reader.pages)

with open('example.txt', 'w') as txt_file:
    for page_index in range(pages_num):
        page_content = pdf_reader.pages[page_index].extract_text()
        txt_file.write(page_content)

pdf_file.close()
